home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / simple7a / frmserve.frm (.txt) < prev    next >
Visual Basic Form  |  1999-10-06  |  4KB  |  146 lines

  1. VERSION 5.00
  2. Begin VB.Form frmServer 
  3.    Caption         =   "Setup Log In Information"
  4.    ClientHeight    =   2670
  5.    ClientLeft      =   60
  6.    ClientTop       =   300
  7.    ClientWidth     =   4680
  8.    ControlBox      =   0   'False
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   2670
  11.    ScaleWidth      =   4680
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Command2 
  14.       Caption         =   "Quit"
  15.       Height          =   435
  16.       Left            =   2760
  17.       TabIndex        =   9
  18.       Top             =   2100
  19.       Width           =   1455
  20.    End
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "Update"
  23.       Height          =   435
  24.       Left            =   360
  25.       TabIndex        =   8
  26.       Top             =   2100
  27.       Width           =   1455
  28.    End
  29.    Begin VB.TextBox Text4 
  30.       Height          =   285
  31.       Left            =   1560
  32.       TabIndex        =   7
  33.       Text            =   "21"
  34.       Top             =   1500
  35.       Width           =   735
  36.    End
  37.    Begin VB.TextBox Text3 
  38.       Height          =   315
  39.       IMEMode         =   3  'DISABLE
  40.       Left            =   1560
  41.       PasswordChar    =   "*"
  42.       TabIndex        =   5
  43.       Top             =   1020
  44.       Width           =   2715
  45.    End
  46.    Begin VB.TextBox Text2 
  47.       Height          =   315
  48.       Left            =   1560
  49.       TabIndex        =   3
  50.       Top             =   540
  51.       Width           =   2715
  52.    End
  53.    Begin VB.TextBox Text1 
  54.       Height          =   285
  55.       Left            =   1560
  56.       TabIndex        =   1
  57.       Top             =   120
  58.       Width           =   2715
  59.    End
  60.    Begin VB.Label Label5 
  61.       Alignment       =   2  'Center
  62.       Caption         =   "For Anonymous login use anonymous for both username and password."
  63.       Height          =   555
  64.       Left            =   2520
  65.       TabIndex        =   10
  66.       Top             =   1440
  67.       Width           =   1875
  68.    End
  69.    Begin VB.Label Label4 
  70.       Alignment       =   1  'Right Justify
  71.       Caption         =   "Port:"
  72.       Height          =   255
  73.       Left            =   120
  74.       TabIndex        =   6
  75.       Top             =   1560
  76.       Width           =   1215
  77.    End
  78.    Begin VB.Label Label3 
  79.       Alignment       =   1  'Right Justify
  80.       Caption         =   "Password:"
  81.       Height          =   255
  82.       Left            =   120
  83.       TabIndex        =   4
  84.       Top             =   1080
  85.       Width           =   1215
  86.    End
  87.    Begin VB.Label Label2 
  88.       Alignment       =   1  'Right Justify
  89.       Caption         =   "User Name:"
  90.       Height          =   255
  91.       Left            =   120
  92.       TabIndex        =   2
  93.       Top             =   600
  94.       Width           =   1215
  95.    End
  96.    Begin VB.Label Label1 
  97.       Alignment       =   1  'Right Justify
  98.       Caption         =   "Host Name:"
  99.       Height          =   255
  100.       Left            =   120
  101.       TabIndex        =   0
  102.       Top             =   120
  103.       Width           =   1215
  104.    End
  105. Attribute VB_Name = "frmServer"
  106. Attribute VB_GlobalNameSpace = False
  107. Attribute VB_Creatable = False
  108. Attribute VB_PredeclaredId = True
  109. Attribute VB_Exposed = False
  110. Private Sub Command1_Click()
  111. If Text1.Text = "" Or Text2.Text = "" Or Text3.Text = "" Or Text4.Text = "" Then
  112.    MsgBox "All data fields must be filled in!"
  113.    Exit Sub
  114. End If
  115. Open App.Path & "\login.dat" For Output As #1
  116. Print #1, Text1.Text
  117. Print #1, Text2.Text
  118. Print #1, Text3.Text
  119. Print #1, Text4.Text
  120. Close #1
  121. frmMain.Label4.Caption = "Not Connected"
  122. frmMain.Label4.Refresh
  123. DoEvents
  124. GoOnline = True
  125. Unload Me
  126. End Sub
  127. Private Sub Command2_Click()
  128. Unload Me
  129. End Sub
  130. Private Sub Form_Load()
  131. If Dir(App.Path & "\login.dat", vbNormal) = "" Then
  132.    MsgBox "You must Enter Server Information"
  133.    Exit Sub
  134.    Open App.Path & "\login.dat" For Input As #1
  135.    Line Input #1, buff
  136.    Text1.Text = buff
  137.    Line Input #1, buff
  138.    Text2.Text = buff
  139.    Line Input #1, buff
  140.    Text3.Text = buff
  141.    Line Input #1, buff
  142.    Text4.Text = buff
  143.    Close #1
  144. End If
  145. End Sub
  146.